package com.qf.common;

import com.qf.mybatis925.utils.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler
    public R handleException(Exception e){
        R r = new R();
        r.setCode(500);
        r.setMsg("服务器异常");
        return r;
    }

}
